package com.hong.spring.common.entity;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

/**
 * @Auther: csh
 * @Date: 2020/7/9 16:43
 * @Description:测试@PostConstruct 和 @PreDestroy 注释
 */
public class JSR_250
{
    private String userName;

    public JSR_250(String name) {
        this.userName = name;
    }

    public JSR_250() {
    }

    @PostConstruct
    public void init(){
        System.out.println("执行了PostConstruct");
    }

    @PreDestroy
    public void preDestroy(){
        System.out.println("执行了PreDestroy");
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }
}
